Electronic device, system for pairing electronic devices and method for pairing electronic devices

ABSTRACT

An electronic device includes: a data acquiring unit configured to detect an encryption apparatus in a preset distance range and to read preset data in the detected encryption apparatus; a data storage unit configured to store the preset data; and a connection establishing unit configured to establish power line communication connections, according to the preset data, with other electronic devices reading and storing the preset data. The disclosure further proposes a system for pairing electronic devices and a method for pairing electronic devices. With the technical solutions of the invention, power line communication connections between the electronic devices can be established rapidly, conveniently and more accurately.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims priorities to Chinese patent application No.201310293878.4 filed on Jul. 19, 2013, Chinese patent application No.201310682574.7, filed on Dec. 12, 2013, and Chinese patent applicationNo. 201310743306.1, filed on Dec. 27, 2013, the contents of which areincorporated herein by reference in their entirety.

FIELD OF THE INVENTION

The present invention relates to an electronic device, a system forpairing electronic devices and a method for pairing electronic devices.

BACKGROUND OF THE INVENTION

Data can be transmitted through a power line in the technology of PowerLine Communication (PLC), to make it possible to transmit broadband dataand overcome the drawback of considerable degradation in performance dueto a poor capability of a wireless signal of a WLAN (Wireless Local AreaNetwork) to pass through a wall. A user networking PLC modules has toarrange connections between the modules, but some problems may occurwith establishment of the connections.

SUMMARY OF THE INVENTION

In one aspect of this application which proposes an electronic deviceincluding: a data acquiring unit configured to detect an encryptionapparatus in a preset distance range and to read preset data in thedetected encryption apparatus; a data storage unit configured to storethe preset data; and a connection establishing unit configured toestablish power line communication connections, according to the presetdata, with other electronic devices reading and storing the preset data.

In another aspect of this application which further proposes a systemfor pairing electronic devices, the system includes at least oneelectronic device and an encryption apparatus, wherein the encryptionapparatus stores preset data, and the electronic device includes: a dataacquiring unit configured to detect the encryption apparatus in a presetdistance range and to read the preset data in the detected encryptionapparatus; a data storage unit configured to store the preset data; anda connection establishing unit configured to establish power linecommunication connections with other electronic devices reading andstoring the preset data among the at least one electronic deviceaccording to the preset data.

In another aspect of this application which further proposes a methodfor pairing electronic devices, the method includes: detecting, by anelectronic device, an encryption apparatus in a preset distance range,reading preset data in the detected encryption apparatus and storing thepreset data; and establishing, by the electronic device, according tothe preset data, power line communication connections with otherelectronic devices reading and storing the preset data.

With the foregoing technical solutions, power line communicationconnections between the electronic devices can be established rapidly,conveniently and more accurately.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of an electronic device according toan embodiment of the invention;

FIG. 2 illustrates a schematic block diagram of a card reader based onradio frequency identification according to an embodiment of theinvention;

FIG. 3 illustrates a schematic diagram of networking based on theHomePlug AV protocol in the prior art;

FIG. 4 illustrates a block diagram of a power line communication deviceaccording to an embodiment of the invention;

FIG. 5 illustrates a schematic diagram of networking a power linecommunication device based on the legacy HomePlug AV protocol and apower line communication device based on a novel HomePlug AV protocolaccording to an embodiment of the invention;

FIG. 6 illustrates a block diagram of a system for pairing electronicdevices according to an embodiment of the invention;

FIG. 7 illustrates a flow chart of a method for pairing electronicdevices according to an embodiment of the invention;

FIG. 8 illustrates a flow chart of the step 702 in FIG. 7;

FIG. 9 illustrates a schematic flow chart of a method for reading a cardbased on radio frequency identification according to an embodiment ofthe invention;

FIG. 10 illustrates a schematic flow chart of a method for reading acard based on radio frequency identification according to anotherembodiment of the invention;

FIG. 11 illustrates a flow chart of an access method for a power linecommunication device according to an embodiment of the invention; and

FIG. 12A and FIG. 12B illustrate schematic diagrams of establishing apower line communication connection according to an embodiment of theinvention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

In order to make the foregoing object, features and advantages of theinvention become more apparent, the invention will be further detailedbelow with reference to the drawings and embodiments thereof. It shallbe noted that the embodiments of this application and the features inthe embodiments may be combined with each other unless there is aconfliction.

Numerous particular details will be set forth in the followingdescription for full understanding of the invention, but the inventioncan be embodied in other embodiments than those described here, so theinvention will not be limited to the embodiments described below.

FIG. 1 illustrates a block diagram of an electronic device according toan embodiment of the invention.

As illustrated in FIG. 1, the electronic device 100 according to theembodiment of the invention includes a processor configured to executeprogram codes to implement: a data acquiring unit 102 configured todetect an encryption apparatus in a preset distance range and to readpreset data in the detected encryption apparatus; a data storage unit103 configured to store the preset data; and a connection establishingunit 104 configured to establish power line communication connections,with other electronic devices reading and storing the preset data, basedon the preset data. The data storage unit 103 may be a memory (includingbut not limited to a disk memory, a CD-ROM, an optical memory, etc.), inwhich the preset data is stored possibly together with computer usableprogram codes.

The electronic device 100 may be an electronic device with a PLC module(e.g., a television set, an air conditioner, a refrigerator, a socket,etc., where the socket may be a socket partially embedded in a wall ormay be a power strip) and can communicate with other electronic devicesthrough PLC and is further arranged with a Near Field Communication(NFC) module configured to detect an NFC device, and the encryptionapparatus may be an NFC device, e.g., an NFC tag (i.e., NFC card) inwhich the preset data is stored, or, of course, the encryption apparatusmay be a device with an NFC module, e.g., a handset, a tablet computer,etc., where the preset data is stored in the NFC module.

The encryption apparatus may be brought in proximity to the electronicdevice 100 to be encrypted, and when the encryption apparatus is locatedin the preset distance range of the electronic device 100, theelectronic device 100 may read the preset data in the encryptionapparatus through near field communication, then the encryptionapparatus may be further brought in proximity to other electronicdevices to be encrypted, respectively, so that the other electronicdevices to be encrypted read the preset data, respectively, and in thisway the electronic devices to be encrypted can establish power linecommunication connections according to the read preset data (which isequivalent to pairing data for encrypting the power line communicationconnections between the electronic devices), thus decreasing the periodof time of manual operation to set pairing data one by one for eachelectronic device, to thereby effectively speed up setting of thepairing data for the plurality of electronic devices and establishmentof the power line communication connections between the electronicdevices and make it convenient for the user to use the encryptionapparatus to set for the plurality of electronic devices to be encryptedthe pairing data for encryption of the power line communicationconnections between the electronic devices; and the read preset data maybe stored to avoid a failure to establish a power line communicationconnection due to a loss of the preset data when an electronic device ispowered on again after being power off, where the preset data may be aUnique Identifier (UID) or another preset string of characters (whichmay be a string of digits or letters or a combination thereof, etc.).Since the preset data is stored in the encryption apparatus andelectronic devices in proximity to the encryption apparatus can read thepreset data, the encryption apparatus may be brought on purpose inproximity to the electronic devices to be encrypted to encrypt them, tothereby ensure that the electronic devices reading the preset data canbe paired with each other, but an electronic device failing to read thepreset data cannot participate in the power line communicationconnection, thus avoiding an improper encryption operation and anillegal power line communication connection and improving the accuracyof establishing the power line communication connections between theelectronic devices.

Optionally, the data acquiring unit 102 includes a detecting sub-unit1022, a reading sub-unit 1024 and a matching sub-unit 1026, where thedetecting sub-unit 1022 is configured to detect whether there is anencryption apparatus in the preset distance range; the reading sub-unit1024 is configured to read a verification code in the encryptionapparatus when the detecting sub-unit 1022 detects the encryptionapparatus, and to read the preset data when the matching sub-unit 1026determines that the verification code matches with a preset verificationcode, or to stop reading data from the encryption apparatus when thematching sub-unit 1026 determines that the verification code does notmatch with the preset verification code; and the matching sub-unit 1026is configured to judge whether the verification code matches with thepreset verification code.

After detecting the encryption apparatus, the electronic device 100 mayread the verification code therein, and determine that the encryptionapparatus has a privilege to encrypt the electronic device 100 when theverification code matches with the preset verification code in theelectronic device 100 and read the preset data in the encryptionapparatus, or determine that the encryption apparatus has no privilegeto encrypt the electronic device 100 if the read verification code doesnot match with the preset verification code and stop reading the datafrom the encryption apparatus. The privilege of the encryption apparatuscan be judged, to ensure that an encryption apparatus for which theprivilege is set by the user can encrypt the electronic device 100, tothereby avoid that the user cannot know pairing data for encryption of apower line communication connection because an encryption apparatus forwhich no privilege is set by the user encrypts the electronic device100.

The combination of the detecting sub-unit 1022 and the reading sub-unit1024 may be an NFC module based on radio frequency identification, e.g.,an NFC card reader.

FIG. 2 illustrates a schematic block diagram of a card reader based onradio frequency identification according to an embodiment of theinvention.

As illustrated in FIG. 2, the card reader 200 based on radio frequencyidentification according to the embodiment of the invention includes: aninteracting sub-unit 202 configured to send a query instruction for aradio frequency card in the encryption apparatus and to receive responseinformation to the query instruction; a checking sub-unit 204 configuredto check a format of the response information received by theinteracting sub-unit 202 to obtain a checking result; and a judgingsub-unit 206 configured to determine that the radio frequency card islocated when the checking result of the checking sub-unit 204 indicatesthat the format of the response information satisfies a predeterminedinformation format.

In this technical solution, the format of the response information canbe checked upon reception of the response information to the queryinstruction, to judge whether the format of the response informationsatisfies the predetermined information format, to thereby obviate thecard reader from being triggered improperly due to environmentinterference (e.g., in a strong current environment).

In the foregoing technical solution, optionally, the checking sub-unit204 is further configured to check whether the length in bytes of theresponse information satisfies a predetermined length; and the judgingsub-unit 206 is further configured to determine that the radio frequencycard is located when the checking result of the checking sub-unit 204indicates that the length in bytes of the response information satisfiesthe predetermined length.

In this technical solution, for example, when the NFC card reader isimproperly triggered, the length in bytes of received responseinformation is not determinate, that is, may be 0 byte, 1 byte, or 2bytes, etc., while the length of the standard response information is 2bytes. Therefore, an improper trigger can be filtered out by judging thenumber of bytes of the response information.

In the foregoing technical solution, optionally, the checking sub-unit204 is further configured to check whether a field format of theresponse information satisfies a predetermined field format; and thejudging sub-unit 206 is further configured to determine that the radiofrequency card is located when the checking result of the checkingsub-unit 204 indicates that the field format of the response informationsatisfies the predetermined field format.

In this technical solution, it can be further judged whether the fieldformat of the response information is the same as a standard fieldformat upon determining that the length of the response information is 2bytes, to further judge whether the card reader is improperly triggered,or it can be directly judged whether the field format of the responseinformation is the same as the standard field format, to obviate animproper trigger.

In the foregoing technical solution, optionally, the interactingsub-unit 202 is further configured to send the query instruction at apredetermined time interval; and the judging sub-unit 206 is furtherconfigured to judge whether the interacting sub-unit 202 receives theresponse information continuously for a number of times and whether allthe response information received continuously for the number of timessatisfies the predetermined information format, and if so, to determinethat the radio frequency card is located; and the checking sub-unit 204is further configured to check the format of the response informationreceived by the interacting sub-unit 202 continuously for the number oftimes.

In this technical solution, the query instruction is sent at thepredetermined time interval, and it is judged whether the responseinformation is received continuously for a number of times and whetherall the response information received continuously for the number oftimes satisfies the predetermined information format, to thereby loweran influence of an environmental factor, e.g., dithering, due to whichthe radio frequency card cannot respond normally to the queryinstruction and consequently the card may be read improperly by the cardreader. For example, when the radio frequency card is at a boundary of aradiation area of the card reader, dithering of the radio frequency cardmay cause the card reader to misjudge that the card enters a card readarea again after leaving it and consequently read the card again, and anunintentional “dithering” action of the user is typically in 200 ms, soit can be set to send the query instruction at an interval of 500 ms (ofcourse, other time intervals are also possible), and it is judgedwhether accurate response information is received continuously for anumber of times (e.g., 3 times), to thereby lower an influence of anenvironmental factor, due to which the card is read improperly by thecard reader.

In the foregoing technical solution, optionally, the card reader 200further includes an acquiring sub-unit 208 (which is equivalent to thereading sub-unit 1024 described above) configured to acquire identifierinformation of the radio frequency card when the judging sub-unit 206determines that the radio frequency card is located. The identifierinformation of the radio frequency card may be used as the preset data.

In this technical solution, for example, a UID of the radio frequencycard may be acquired after the radio frequency card is located, toencrypt a communication link.

Optionally, the electronic device 100 further includes a judging unit106, where the data acquiring unit 102 is further configured to acquirepairing data in a connection request of an electronic device to bepaired when the electronic device 100 receives the connection request,and the judging unit 106 is configured to judge whether the pairing datais the same as the preset data; and the connection establishing unit 104is further configured to establish a power line communication connectionwith the electronic device to be paired when the judging unit 106determines the pairing data is the same as the preset data or to rejectestablishment of a power line communication connection with theelectronic device to be paired when the judging unit 106 determines thepairing data is different from the preset data.

Since there may be a plurality of electronic devices to be paired goingto establish power line communication connections with the electronicdevice 100, including electronic devices also reading and storing thepreset data in the encryption apparatus and electronic devices failingto read the preset data, the electronic device 100 may judge whether thepairing data in the connection request of the electronic device to bepaired is the same as the preset data upon reception of the connectionrequest, to thereby determine the electronic devices, capable ofestablishing power line communication connections with the electronicdevice 100, among the electronic devices to be paired, to thereby avoidan illegal electronic device from establishing a power linecommunication connection with the electronic device 100.

Optionally, the electronic device 100 further includes an encryptioncalculating unit 108 configured to perform encryption calculation on thepreset data through a preset algorithm to obtain encrypted data, wherethe connection establishing unit 104 is further configured to establishthe power line communication connections with the other electronicdevices according to the encrypted data.

After reading the preset data, the electronic device 100 may furtherperform encryption calculation on the preset data through the presetalgorithm and then use the encrypted data after the encryptioncalculation as the pairing data of the power line communicationconnections, and the other electronic devices reading the preset datamay also perform encryption calculation on the preset data through thepreset algorithm, so that the power line communication connections canbe established between the electronic deices according to the presetuniform encrypted data. Since the pairing data is encrypted by thepreset encryption calculation, such a probability can be lowered thatanother electronic device without any privilege to establish a powerline communication connection may read the encrypted data and establishan illegal power line communication connection.

Optionally, the electronic device 100 further includes a data modifyingunit 110 configured to modify the preset data in response to a receiveddata modification instruction.

The user may set new data as needed through the electronic device 100,and then send the new data to the encryption apparatus to modify thepreset data therein, to thereby use the new data as pairing data forpower line communication connections between the electronic devices 100.

The electronic device 100 may further include a power line communicationmodule. Data can be transmitted through a power line in PLC, to transmitbroadband data and overcome the drawback of considerable degradation inperformance due to a poor capability of a WLAN for a wireless signal topass through a wall.

To network PLC modules, according to the existing HomePlug AV protocol(HomePlug AV is a standard defined by the Home Plug Powerline Allianceto satisfy a demand for transmission of home digital multimedia, thustransmitting data over a power line, a telephone wire and a coaxialcable), a newly powered-on electronic device detecting no otherelectronic devices may set itself as a Central Coordinator (CCo) of acurrent home network and broadcast a beacon packet to inquire aboutpresence of a PLC network or device. If there is a PLC network, then thenetwork may send a response to the CCo and further constitute therewitha new network.

The existing HomePlug AV protocol suffers from at least such a technicalproblem that if there is no PLC device around the newly powered-onelectronic device (that is, in the event that there is only oneelectronic device), then it is unnecessary to broadcast the beaconpacket, which would increase power consumption of the electronic deviceitself and occupy a PLC link bandwidth and also increase electromagneticradiation interference to other power consuming devices.

In view of the foregoing technical problem, an embodiment of theinvention proposes an improved HomePlug AV protocol, so as to lowerpower consumption of the electronic device itself and itselectromagnetic radiation interference to other power consuming devices.

Firstly, several terms appearing throughout this specification will bedefined.

HomePlug AV: AV stands for Audio and Video, and the Home Plug PowerlineAlliance was set up jointly by dozens of enterprises including Cisco,HP, Motorola, Intel, etc., in March, 2000, and a uniform standard anddefinitive progression for conceived deployment of a local area networkof power lines. Thereafter the first standard of a power line network,referred to as HomePlug 1.0, was published by the Home Plug PowerlineAlliance in June, 2001. The later HomePlug AV standard was granted bythe Home Plug Powerline Alliance in August, 2005.

HomePlug AV was evolved from an access through a broadband power line,where the power line is a technology of an access to a home broadband totransmit and access a broadband data service over the Internet throughmedium-voltage and low-voltage power lines in an existingalternating-current power distribution network. An alternating-currentpower line is the most difficult wired communication medium, andpredominate factors interfering with communication transmission anddeteriorating a communication signal are a variety of unpredictableinterference, attenuation and distortion from numerous sources,including a wide range of changes in impedance, a high attenuationlevel, propagation of a multi-path time delay, etc., e.g., spark noiseof a switched power source, an electric light and an electric brush,electrostatic noise, noise arising from an electric motor, a microwave,a transformer, etc.; attenuation arising from a branch line, a powerdistribution panel, a breaker, an inductive heater, etc.; and distortionarising from an inconstant nonlinear power load, a mismatch inimpedance, etc. In another example, circuit branches and loads areinterconnected almost randomly, so there is an unpredictable transferfunction for a pathway between any two power source sockets at home, andthus amplitude and phase responses of the pathway may vary withfrequency in a wide range, where the amplitude response may go beyond anallowable range (varying from several dB to more than 80 dB); moreover,there may be a channel response varying over time when various powerconsuming devices are powered on and powered off. Therefore, thetechnology of HomePlug AV emerged. HomePlug AV is a standard defined bythe Home Plug Powerline Alliance to satisfy a demand for transmission ofhome digital multimedia, thus transmitting data over a power line, atelephone wire and a coaxial cable. HomePlug AV is intended to build ahigh quality, multi-media stream and entertainment-oriented network overpower lines at home, to particularly satisfy the demand for transmissionof home digital multimedia. It makes use of advanced physical layer andMAC layer technologies to provide a power line network at a level of 200Mbps for transmission of video, audio and data.

CCo stands for Central Coordinator, and is an MAC layer entity definedin the HomePlug AV protocol, controls an operation of a device in apower line network where the CCo resides and coordinates coexistencewith an adjacent power line network, to support bandwidth management,access control, multi-power line network operation and other functions.Several electronic devices (stations) supporting the HomePlug AVprotocol may be interconnected together into a HomePlug AV LogicalNetwork (AVLN). There is one and only one station with the identity of aCCo in one AVLN to perform centralized management on the MAC layerthroughout the AVLN. The CCo broadcasts periodically a beacon packet toall the stations in the AVLN to allocate and announce a bandwidth.

FIG. 3 illustrates a schematic diagram of networking based on theHomePlug AV protocol in the prior art.

According to the existing HomePlug AV protocol, an electronic devicewith a PLC module may listen to a beacon packet over a power line mediumupon being powered on. If an existing AVLN is found from listening, thatis, a beacon packet sent from a CCo device in the existing AVLN (the CComay transmit the beacon packet to notify the newly powered-on electronicdevice of its presence, and then they may send packets to each other tonegotiate about which of them is decided to act a new CCo according totheir MAC addresses) is received, then the newly powered-on electronicdevice may join the existing AVLN. As illustrated in FIG. 3, a newlypowered-on electronic device 302 listens to a beacon packet transmittedthrough a power line, and a previously powered-on electronic device 304may broadcast a beacon packet, and the newly powered-on electronicdevice may respond upon reception of the beacon packet.

If there is no other electronic device, that is, in the event that thereis only one electronic device, then the newly powered-on electronicdevice itself may become a CCo and broadcast a beacon packet to buildits own network. Other electronic devices may contact it and constitutetherewith an AVLN after being powered on. This comes with such a problemthat the newly powered-on electronic device may send a beacon packeteven if there is only the newly powered-on electronic device itselfwhich is a PLC device, and in this case such a beacon packet is uselessbut occupies a bandwidth of a PLC link and incurs unnecessary powerconsumption and also brings conductive radiation interference to otherpower consuming devices.

A power line communication module of an electronic device according toan embodiment of the invention will be described below with reference toFIG. 4.

As illustrated in FIG. 4, the power line communication module 400 of theelectronic device according to the embodiment of the invention includes:a listening unit 402 configured to listen to a data packet, transmittedover a power line, from other electronic devices when the electronicdevice accesses the power line; and a broadcast unit 404 configured tobroadcast no data packet and keep silence upon detection of no datapacket from any other electronic device. The electronic device accordingto the embodiment of the invention can support the improved HomePlug AVprotocol proposed according to the embodiment of the invention. When theelectronic device is powered on, it sends no data packet and keepssilence to wait for a data packet broadcasted from the other electronicdevices and again will send no data packet and keep silence upondetection of no data packet from the other electronic devices. Thus,when there is only one electronic device in an existing networkenvironment, it is not necessary to determine which electronic device isa central coordinator of the existing network, and the electronic devicewill not send any data packet on its own initiative until a data packetsent from the other electronic devices is received, to thereby lowerunnecessary electromagnetic conductive radiation and interference to theother power consuming device.

In the foregoing technical solution, optionally, the broadcast unit 404is further configured to respond to the data packet from the otherelectronic devices upon detection of the data packet to join anestablished power line logical network.

In the foregoing technical solution, optionally, the broadcast unit 404may include a determining unit 4042 configured to receive media accesscontrol addresses from the other electronic devices and to determine acentral coordinator in the power line logical network according to themedia access control address of the electronic device and the mediaaccess control addresses of the other electronic devices. The broadcastunit 404 is further configured to send a notification to the otherelectronic devices after determining the electronic device as thecentral coordinator.

FIG. 5 illustrates a schematic diagram of networking an electronicdevice based on the legacy HomePlug AV protocol and an electronic devicebased on the novel HomePlug AV protocol according to an embodiment ofthe invention.

As illustrated in FIG. 5, a previously powered-on electronic device 504is an electronic device based on the novel HomePlug AV protocolaccording to the embodiment of the invention. The electronic device 504is silent. In this case, a newly powered-on electronic device 502 is anelectronic device based on the legacy HomePlug AV protocol. Theelectronic device 502 may set itself as a central coordinator andbroadcast a data packet when accessing a power line and no otherelectronic device is detected. The electronic device 504 responds to thedata packet broadcasted by the electronic device 502 upon reception ofthe data packet and builds therewith an AVLN. They send packets to eachother and determine which of the electronic devices as a new centralcoordinator according to their MAC addresses, for example, an electronicdevice with a higher MAC address may be determined as a centralcoordinator, or, an electronic device with a lower MAC address may bedetermined as a central coordinator.

In the embodiment of the invention, the newly powered-on electronicdevice firstly is silent and will only receive and respond to a beaconpacket sent from another electronic device, before which it will notsend any beacon packet on its own initiative. Thus unnecessaryelectromagnetic conductive radiation and interference of the electronicdevice to other adjacent power consuming devices can be avoided,unnecessary power consumption of the electronic device itself can beavoided, a PLC link bandwidth can be saved and backward compatibilitywith a legacy HomePlug AV protocol device is supported, so that theelectronic devices based on the novel and legacy protocols can stillfind each other and further negation about a CCo and accomplish PLCnetworking without breaking the networking architecture of the existingprotocol.

FIG. 6 illustrates a block diagram of a system for pairing electronicdevices according to an embodiment of the invention.

As illustrated in FIG. 6, the system 600 for pairing electronic devicesaccording to the embodiment of the invention includes at least oneelectronic device 602 and an encryption apparatus 604, where theencryption apparatus 604 stores preset data, and the electronic device602 includes: a data acquiring unit 6022 configured to detect theencryption apparatus 604 in a preset distance range and to read thepreset data in the detected encryption apparatus 604; a data storageunit 6023 configured to store the preset data; and a connectionestablishing unit 6024 configured to establish power line communicationconnections with other electronic devices reading and storing the presetdata among the at least one electronic device 602 according to thepreset data.

The electronic device 602 may be a PLC electronic device (e.g., atelevision set, an air conditioner, a refrigerator, a socket, etc.) andmay communicate with other electronic devices through PLC and is furtherarranged with an NFC module configured to detect an NFC device, and theencryption apparatus may be an NFC device, e.g., an NFC tag (i.e., NFCcard) in which the preset data is stored, or may be a device with an NFCmodule, e.g., a handset, a tablet computer, etc., where the preset datais stored in the NFC module.

The encryption apparatus 604 may be brought in proximity to theelectronic device 602 to be encrypted, one by one, and when theencryption apparatus 604 is located in the preset distance range of theelectronic device 602, the electronic device 602 may read the presetdata in the encryption apparatus 604 through near field communication,so that the respective electronic devices 602 to be encrypted canestablish power line communication connections according to the readpreset data (which is equivalent to pairing data for encrypting thepower line communication connections between the electronic devices),thus decreasing the period of time of manual operation to set pairingdata one by one for each electronic device 602, to thereby effectivelyspeed up setting of the pairing data for the plurality of electronicdevices 602 and establishment of the power line communicationconnections between the electronic devices 602 and make it convenientfor the user to use the encryption apparatus 604 to set for theplurality of electronic devices 602 to be encrypted the pairing data forthe power line communication connections; and the read preset data maybe stored to avoid a failure to establish a power line communicationconnection due to a loss of the preset data when an electronic device ispowered on again after being power off, where the preset data may be aUID or another preset string of characters (which may be a string ofdigits or letters or a combination thereof, etc.). Since the preset datais stored in the encryption apparatus 604 and only electronic devices inproximity to the encryption apparatus 604 can read the preset data, theencryption apparatus 604 may be brought on purpose in proximity to theelectronic devices to be encrypted to encrypt them, to thereby ensurethat only the electronic devices 602 reading the preset data can bepaired with each other, but an electronic device failing to read thepreset data cannot participate in the power line communicationconnection, thus avoiding an improper encryption operation and anillegal power line communication connection and improving the accuracyof establishing the power line communication connections between theelectronic devices 602.

In an embodiment of the invention, computer readable program codescorresponding to the respective units described above are stored in thedata storage unit and executed by the processor.

FIG. 7 illustrates a flow chart of a method for pairing electronicdevices according to an embodiment of the invention.

As illustrated in FIG. 7, the method for pairing electronic devicesaccording to the embodiment of the invention includes: the step 702 ofdetecting by an electronic device an encryption apparatus in a presetdistance range, reading preset data in the detected encryption apparatusand storing the preset data; and the step 704 of establishing by theelectronic device, according to the preset data, power linecommunication connections with other electronic devices reading andstoring the preset data.

The electronic device may be an electronic device with a PLC module(e.g., a television set, an air conditioner, a refrigerator, a socket,etc.) and may communicate with other electronic devices through PLC andis further arranged with an NFC module configured to detect an NFCdevice, and the encryption apparatus may be an NFC device, e.g., an NFCtag (i.e., NFC card) in which the preset data is stored, or may be adevice with an NFC module, e.g., a handset, a tablet computer, etc.,where the preset data is stored in the NFC module.

The encryption apparatus may be brought in proximity to the electronicdevice to be encrypted, and when the encryption apparatus is located inthe preset distance range of the electronic device, the electronicdevice may read the preset data in the encryption apparatus through nearfield communication, then the encryption apparatus may be furtherbrought in proximity to other electronic devices to be encrypted,respectively, so that the other electronic devices to be encrypted readthe preset data, respectively, and in this way the electronic devices tobe encrypted can establish power line communication connectionsaccording to the read preset data (which is equivalent to pairing datafor encrypting the power line communication connections between theelectronic devices), thus decreasing the period of time of manualoperation to set pairing data one by one for each electronic device, tothereby effectively speed up setting of the pairing data for theplurality of electronic devices and establishment of the power linecommunication connections between the electronic devices and make itconvenient for the user to use the encryption apparatus to set for theplurality of electronic devices to be encrypted the pairing data forencryption of the power line communication connections between theelectronic devices; and the read preset data may be stored to avoid afailure to establish a power line communication connection due to a lossof the preset data when an electronic device is powered on again afterbeing power off, where the preset data may be a UID or another presetstring of characters (which may be a string of digits or letters or acombination thereof, etc.). Since the preset data is stored in theencryption apparatus and only electronic devices in proximity to theencryption apparatus can read the preset data, the encryption apparatusmay be brought on purpose in proximity to the electronic devices to beencrypted to encrypt them, to thereby ensure that only the electronicdevices reading the preset data can be paired with each other, but anelectronic device failing to read the preset data cannot participate inthe power line communication connection, thus avoiding an improperencryption operation and an illegal power line communication connectionand improving the accuracy of establishing the power line communicationconnections between the electronic devices.

Optionally, as illustrated in FIG. 8, the step 702 includes: the step7022 of detecting by the electronic device the encryption apparatus inthe preset distance range; the step 7024 of reading a verification codeof the encryption apparatus upon detection of the encryption apparatusand judging whether the verification code matches with a presetverification code; and the step 7026 of reading by the electronic devicethe preset data in the encryption apparatus if the verification codematches with the preset verification code, or stopping reading data fromthe encryption apparatus if the verification code mismatches with thepreset verification code.

After detecting the encryption apparatus, the electronic device may readthe verification code therein, and determine that the encryptionapparatus has a privilege to encrypt the electronic device when theverification code matches with the preset verification code in theelectronic device and read the preset data in the encryption apparatus,or determine that the encryption apparatus has no privilege to encryptthe electronic device if the read verification code does not match withthe preset verification code and stop reading the data from theencryption apparatus. The privilege of the encryption apparatus can bejudged, to ensure that only an encryption apparatus for which theprivilege is set by the user can encrypt the electronic device, tothereby avoid that the user cannot know pairing data for encryption of apower line communication connection because an encryption apparatus forwhich no privilege is set by the user encrypts the electronic device.

The electronic device may include a card reader based on radio frequencyidentification, and FIG. 9 illustrates a schematic flow chart of amethod for reading a card based on radio frequency identificationaccording to an embodiment of the invention.

As illustrated in FIG. 9, the method for reading a card based on radiofrequency identification according to the embodiment of the inventionincludes: the step 902 of sending a query instruction for a radiofrequency card in an encryption apparatus; and the step 904 of judgingwhether response information to the query instruction satisfies apredetermined information format upon reception of the responseinformation, and if so, then determining that the radio frequency cardis located.

In this technical solution, the format of the response information canbe checked upon reception of the response information to the queryinstruction, to judge whether the format of the response informationsatisfies the predetermined information format, to thereby obviate thecard reader from being triggered improperly due to environmentinterference (e.g., in a strong current environment), so as to ensurethat the card reader can be triggered properly.

In the foregoing technical solution, optionally, the step of judgingwhether the response information satisfies the predetermined informationformat includes: judging whether the length in bytes of the responseinformation satisfies a predetermined length.

In this technical solution, for example, when the NFC card reader isimproperly triggered, the length in bytes of received responseinformation is not determinate, that is, may be 0 byte, 1 byte, or 2bytes, etc., while the length of the standard response information is 2bytes. Therefore, whether the card reader is triggered improperly can bejudged by judging the number of bytes of the response information.

In the foregoing technical solution, optionally, the step of judgingwhether the response information satisfies the predetermined informationformat includes: judging whether a field format of the responseinformation satisfies a predetermined field format.

In this technical solution, it can be further judged whether the fieldformat of the response information is the same as a standard fieldformat upon determining that the length of the response information is 2bytes, to further judge whether the card reader is improperly triggered,or it can be directly judged whether the field format of the responseinformation is the same as the standard field format, to obviate animproper trigger.

In the foregoing technical solution, optionally, the step of sending thequery instruction for the radio frequency card in the encryptionapparatus includes: sending the query instruction at a predeterminedtime interval; and before determining that the radio frequency card islocated, the method further includes: judging whether the responseinformation is received continuously for a number of times and whetherall the response information received continuously for the number oftimes satisfies the predetermined information format, and if so, thendetermining that the radio frequency card is located.

In this technical solution, the query instruction is sent at thepredetermined time interval, and it is judged whether the responseinformation is received continuously for a number of times and whetherall the response information received continuously for the number oftimes satisfies the predetermined information format, to thereby loweran influence of an environmental factor, e.g., dithering, due to whichthe radio frequency card cannot respond normally to the queryinstruction and consequently the card may be read improperly by the cardreader. For example, when the radio frequency card is at a boundary of aradiation area of the card reader, dithering of the radio frequency cardmay cause the card reader to misjudge that the card enters a card readarea again after leaving it and consequently read the card again, and anunintentional “dithering” action of the user is typically in 200 ms, soit can be set to send the query instruction at an interval of 500 ms (ofcourse, other time intervals are also possible), and it is judgedwhether accurate response information is received continuously for anumber of times (e.g., 3 times), to thereby lower an influence of anenvironmental factor, due to which the card is read improperly by thecard reader.

In the foregoing technical solution, optionally, after determining thatthe radio frequency card is located, the method further includes:acquiring identifier information of the radio frequency card. Theidentifier information of the radio frequency card may be used as thepreset data.

In this technical solution, for example, a UID of the radio frequencycard may be acquired after the radio frequency card is located, toencrypt a communication link.

FIG. 10 illustrates a schematic flow chart of a method for reading acard based on radio frequency identification according to anotherembodiment of the invention.

As illustrated in FIG. 10, the method for reading a card based on radiofrequency identification according to the another embodiment of theinvention includes the following steps.

In the step 1002, a card reader sends a Request Command, Type A (REQA)(REQA is a command to inquire presence of an ISO14443A card in anexample of an ISO14443A card which is an NFC card), and when there is acard in a Radio Frequency (RF) radiation area of the card reader, thecard may respond with an Answer To Request, Type A (ATQA) (i.e.,response information to REQA).

The step 1004 is to receive the response information to the queryinstruction.

The step 1006 is to check the length in bytes of the responseinformation. Since when the card reader is improperly triggered, thelength in bytes of the response is not determinate, that is, may be 0byte, 1 byte, or 2 bytes, etc., and the data may be somewhat random, butthe length of the ATQA is 2 bytes, it can be determined that the cardreader is improperly triggered when the number of bytes of the receivedresponse information is not 2.

The step 1008 is to check a field format of the response information.The ATQA complies with the definition of ATQA in the ISO14443A-3protocol, where the defined format is depicted in Table 1:

TABLE 1 MSB LSB b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1RFU Proprietary coding UID size RFU Bit frame anticollision bit frame

Where the RFU (Reserved for Future ISO Use) field is a reserved field inthe ISO protocol;

The Proprietary coding field is a proprietary coding field;

The UID size bit frame field is a unique identifier length indicator,where b8 and b7 may be coded in combination as follows: 00 represents a4-byte UID, 01 represents a 7-byte UID, 10 represents a 10-byte UID and11 presents reserved bits;

The Bit frame anti-collision is an anti-collision indicator field, whereone of b1 to b5 shall be set to 1 and the remaining bits shall be set to0;

The MSB (Most Significant Bit) represents the highest bit; and

The LSB (Least Significant Bit) represents the lowest bit.

Thus, it can be further judged whether the response information complieswith the ISO-14443A protocol upon reception of the response information,the length of which is 2 bytes. The majority of response information inerror arising from an environment factor can be precluded by checkingthe length in bytes and the field format of the response information.

The step 1010 is to check the formats of a plurality of pieces ofresponse information corresponding to the query instruction sent at atime interval.

An REQA may be sent at a time interval of Δt, which can be adjusteddependent on a real condition, e.g., may be set to 500 ms.

The card reader recognizing the radio frequency card may receive theresponse information sent from the radio frequency card continuously fora number of times, e.g., the response information received continuouslyfor 3 times is ATQA1, ATQA2 and ATQA3, respectively, and then it can bejudged whether all of ATQA1, ATQA2 and ATQA3 are the same, whether theyhave been checked for their lengths in bytes and field formats andwhether they are valid response information, and if so, then it isdetermined that the radio frequency card is located. If the responseinformation is not received continuously for 3 times or the responseinformation received continuously for 3 times is different or any of theresponse information is incorrect, then it is determined as an impropercard read operation arising from an environmental factor.

Furthermore, since the card reader may read radio frequency cards in avariety of formats, e.g., ISO14443A, ISO14443B, Felica, ISO15693, etc.,corresponding card locating instructions (i.e., query instructions) maybe sent sequentially at a predetermined time interval, to thereby ensurethe card reader responds to the different types of cards at the highestspeed.

In this embodiment, since the response information is verified doubly(i.e., checked for the length in bytes and the field format), responseinformation as a result of radiation interference of a power source canbe discerned and filtered out. The formats of a plurality of pieces ofresponse information corresponding to query instructions sent at a timeinterval are checked, to further filter out a negative influence as aresult of radiation noise of the power source and ensure that the cardreader can be free of being triggered improperly due to an environmentalfactor.

Furthermore, when the card is at a boundary of an RF radiation area ofthe card reader, an influence of an environmental factor, e.g.,dithering of a human hand, may cause the card reader to misjudge thatthe card enters the card read area again after leaving it andconsequently report the UID again or perform another subsequent cardread action. It takes at least 500 ms for a normal “swiping card” actionfrom approaching until leaving, and an unintentional “dithering” actionof the human hand is typically in 200 ms, so the problem of reading thecard in error due to “dithering” can be avoided by lengthening the timeinterval Δt at which the query instruction is sent.

In this embodiment, a number of verifications for validity are requiredto read the card (i.e., from absence of the card until presence of thecard), and also three verifications for validity are required frompresence of the card until absence of the card, to thereby avoid theproblem of reading the card in error due to environmental interference.For example, when the card is in an RF radiation area of the cardreader, the card reader may not necessarily receive correct responseinformation to each query instruction due to an environmental factor.For example, if an ISO14443A type of card in an RF radiation area of thecard reader fails to feed back ATQA normally due to an environmentalfactor, then the card reader may misjudge that the card has leaved theRF radiation area of the card reader (although the card is in the areaindeed), and further misjudge that the card enters the RF radiation areaand consequently read the card again upon subsequent reception ofcorrect ATQA. This may result in serious problems, e.g., a repeateddeduction from the balance of a public transportation card, a bank card,a social security card, etc.

The card reader in this embodiment has been described by taking an NFCcard reader as an example, and of course, the card reader may be anothertype of card reader, e.g., an RFID card reader, etc., particularly maybe a radio frequency card reader in a handset, a card reader in a bus,etc.

In view of the imperfect and highly limited anti-interference mechanismof the card reader based on radio frequency identification in the priorart, for example, the use of the check mechanism of the protocol canonly prevent an error in a data packet, but has no help in handling theproblem of improperly reading the card due to strong currentinterference, that is, the card reader misjudges presence of a cardalthough the card is absent or misjudges absence of a card although thecard is present. Therefore, the disclosure proposes a novel technologyto read a card based on radio frequency identification, so as to avoid acard reader from being triggered improperly due to environmentalinterference and to ensure that the card reader can be triggeredaccurately and return accurate information.

Optionally, the method for pairing electronic devices further includes:acquiring, by the electronic device reading the preset data, pairingdata in a connection request of an electronic device to be paired uponreception of the connection request, judging whether the pairing data isthe same as the preset data, and if so, then establishing a power linecommunication connection with the electronic device to be paired;otherwise, rejecting establishment of a power line communicationconnection with the electronic device to be paired.

Since there may be a plurality of electronic devices to be paired goingto establish power line communication connections with the electronicdevice, including electronic devices also reading and storing the presetdata in the encryption apparatus and electronic devices failing to readthe preset data, the electronic device may judge whether the pairingdata in the connection request of the electronic device to be paired isthe same as the preset data upon reception of the connection request, tothereby determine the electronic devices, capable of establishing powerline communication connections with the electronic device, among theelectronic devices to be paired, to thereby avoid an illegal electronicdevice from establishing a power line communication connection with theelectronic device.

Optionally, the method for pairing electronic devices further includes:the electronic device performs encryption calculation on the read presetdata through a preset algorithm to obtain encrypted data and establishesthe power line communication connections with the other electronicdevices according to the encrypted data.

After reading the preset data, the electronic device may further performencryption calculation on the preset data through the preset algorithmand then use the encrypted data after the encryption calculation as thepairing data of the power line communication connections, and the otherelectronic devices reading the preset data may also perform encryptioncalculation on the preset data through the preset algorithm, so that thepower line communication connections can be established between theelectronic deices according to the preset uniform encrypted data. Sincethe pairing data is encrypted by the preset encryption calculation, sucha probability can be lowered that another electronic device without anyprivilege to establish a power line communication connection may readthe encrypted data and establish an illegal power line communicationconnection.

Optionally, the method for pairing electronic devices further includes:listening to a data packet, transmitted over a power line, from anotherelectronic device when the electronic device accesses the power line;and broadcasting no data packet and keep silence upon detection of nodata packet from any other electronic device, where the electronicdevice includes a power line communication module.

As illustrated in FIG. 11, the flow of the HomePlug AV protocoldescribed above is improved according to an embodiment of the invention,the embodiment of the invention proposes a novel access method for anelectronic device, which improves the original protocol and is backwardcompatible with the original protocol (a device of the novel protocolcan interact with a device of the legacy protocol and accomplishtherewith PLC networking without breaking the existing networkingmechanism. The access method for an electronic device includes thefollowing steps.

The step 1102 of listening to a data packet, transmitted over a powerline, from another electronic device when the electronic device accessesthe power line; and the step 1104 of broadcasting no data packet andkeeping silence upon detection of no data packet from the otherelectronic devices. When there is an electronic device powered on, theelectronic device sends no data packet and keeps silence to wait for adata packet broadcasted from another electronic device, and again sendsno data packet and keeps silence upon detection of no data packet fromany other electronic device. Thus, when there is only one electronicdevice in an existing network environment, it is not necessary todetermine which electronic device is a central coordinator of theexisting network, and the electronic device will not send any datapacket on its own initiative until a data packet sent from anotherelectronic device is received, to thereby lower unnecessaryelectromagnetic conductive radiation and interference to the other powerconsuming device.

In the foregoing technical solution, optionally, the method may furtherinclude the steps of: if the data packet from another electronic deviceis detected, then responding to the data packet and joining anestablished power line logical network. The other electronic device isan electronic device based on the legacy protocol. Thus, the novelprotocol according to the embodiment of the invention can be compatiblewith the legacy protocol without breaking the networking architecture ofthe existing protocol.

In any of the foregoing technical solutions, optionally, a centralcoordinator in the power line logical network is determined according tothe media access control address of the electronic device and the mediaaccess control addresses of the other electronic devices; and anotification is sent to the other electronic devices after theelectronic device is determined as the central coordinator. At least oneelectronic device accessing the power line among the other electronicdevices broadcasts the data packet if no data packet from any otherelectronic device is detected.

The access method for an electronic device according to the disclosureis applicable to a scenario where there is only one electronic device,and when there are a plurality of electronic devices, at least one ofthe electronic devices is required to be based on the original protocol,and the electronic devices cannot notify each other if all of them arebased on the novel protocol.

In other words, this method is applicable to a home appliance with a PLCmodule (e.g., an air conditioner, a refrigerator, a television set, asocket, etc.). PLC devices need to be used in pair, and the improvedHomePlug AV protocol according to the embodiment of the invention may beadopted in the home appliances while the existing HomePlug AV protocolis still adopted in a PLC power modem, so that formation of an AVLNnetwork can be ensured at an improved gain, to further ensureconnectivity of PLC links (the power model using the existing protocolmay set itself as a CCo and send a beacon packet to the PLC homeappliances on its own initiative, to form the network and perform PLC),on the other hand, the improved HomePlug AV protocol according to theembodiment of the invention can be compatible with the legacy HomePlugAV protocol without breaking the existing networking mechanism.

According to the improved HomePlug AV protocol according to theembodiment of the invention, an electronic device accessing a power linekeeps silence (sends no beacon packet), and further keeps silence if noother electronic device is found (no beacon packet broadcasted from anyother electronic device is received) after being powered on; or if anAVLN has been formed by other electronic devices (that is, a beaconpacket sent from a CCo of the AVLN is received) after being powered on,then upon reception of such a beacon packet, the electronic deviceresponds to the beacon packet and negotiates about which of theelectronic devices acts as a CCo of the new network and thereafter formsthe new network. The disclosure is particularly applicable to a scenariowhere only one electronic device is powered on, and since the electronicdevice sends no data packet upon being powered on, electromagneticconductive radiation and interference thereof to other power consumingdevices can be avoided, and also unnecessary power consumption of theelectronic device can be avoided to save a PLC link bandwidth and forbackward compatibility with a legacy HomePlug AV protocol device, thenthe devices supporting the novel and legacy protocols can still findeach other and further negation about a CCo and accomplish PLCnetworking without breaking the networking architecture of the existingprotocol.

The PLC module as described in the above embodiments may be embedded ina home appliance or may be arranged outside the home appliance.

FIG. 12A and FIG. 12B illustrate schematic diagrams of establishing apower line communication connection according to an embodiment of theinvention.

As illustrated in FIG. 12A, the electronic device 100 as illustrated inFIG. 1 may be a device including a PLC module and capable ofcommunicating with another electronic device through the PLC module, andthe electronic device 100 may further be arranged with an NFC module1202, and the encryption apparatus may be an NFC device arranged, forexample, like a card, simply referred to as an NFC card 1204. The NFCmodule 1202 may detect another NFC device in a specific space range,e.g., a detection distance R=10 centimeters, then when a distancebetween the center of the NFC card 1204 and the center of the NFC module1202 is less than or equal to 10 centimeters, the NFC module 1202 candetect the NFC card 1204 and further read the preset data from the NFCcard 1204 as the pairing data for establishing power line communicationconnections with other PLC devices.

As illustrated in FIG. 12B, after the NFC card 1204 is brought inproximity to the electronic device 100, the electronic device 100 readsthe preset data in the NFC card 1204 as the pairing data for encryptingpower line communication connections with other electronic devices, andthen the NFC card 1204 is brought in proximity to the other electronicdevices one by one, for example, there are n electronic devices intotal, and then it is brought in proximity respectively to each of the nelectronic devices, so that the n electronic devices read the presetdata in the NFC card 1204 as the pairing data, respectively, then powerline communication connections can be established between the nelectronic devices with the preset data being pairing data, thusdecreasing the period of time of manual operation for each electronicdevice to negotiate about the pairing data, and the pairing data can beset for each electronic device simply by swiping the card in proximityto each PLC device, which is simple and convenient, and the preset datamay be a UID or another string of characters preset in the NFC card(which may be a string of digits or letters or a combination thereof,etc.). A power line communication connection can only be establishedbetween electronic devices reading the preset data, and an electronicdevice failing to read the preset data cannot establish a power linecommunication connection with an electronic device reading the presetdata, since their pairing data are different, to thereby lower aprobability of improper encryption and an illegal power linecommunication connection.

With the technical solutions according to the embodiments of thisapplication, passwords can be set through near field communication forelectronic devices between which power line communication connectionsare established, to thereby establish the power line communicationconnections rapidly, conveniently and accurately between the pluralityof electronic devices.

The foregoing description is merely illustrative of the embodiments ofthe invention, but not intended to limit the invention, and numerousmodifications and variations to the invention will occur to thoseskilled in the art. Any modifications, equivalent substitutions,adaptations, etc., made without departing from the spirit and theprinciple of the invention shall come into the claimed scope of theinvention.

1. An electronic device, comprising: a data acquiring unit configured todetect an encryption apparatus in a preset distance range and to readpreset data in the detected encryption apparatus; a data storage unitconfigured to store the preset data; and a connection establishing unitconfigured to establish power line communication connections, accordingto the preset data, with other electronic devices reading and storingthe preset data.
 2. The electronic device according to claim 1, whereinthe data acquiring unit comprises a detecting sub-unit, a readingsub-unit and a matching sub-unit, and wherein: the detecting sub-unit isconfigured to detect the encryption apparatus in the preset distancerange; the reading sub-unit is configured to read a verification code inthe encryption apparatus when the detecting sub-unit detects theencryption apparatus, and to read the preset data when the matchingsub-unit determines that the verification code matches with a presetverification code or to stop reading data from the encryption apparatuswhen the matching sub-unit determines that the verification codemismatches with the preset verification code; and the matching sub-unitis configured to judge whether the verification code matches with thepreset verification code.
 3. The electronic device according to claim 2,wherein the detecting sub-unit comprises: an interacting sub-unitconfigured to send a query instruction for a radio frequency card in theencryption apparatus and to receive response information to the queryinstruction; a checking sub-unit configured to check a format of theresponse information received by the interacting sub-unit to obtain achecking result; and a judging sub-unit configured to determine that theradio frequency card is located when the checking result of the checkingsub-unit indicates that the format of the response information satisfiesa predetermined information format.
 4. The electronic device accordingto claim 3, wherein: the checking sub-unit is further configured tocheck whether the length in bytes of the response information satisfiesa predetermined length or to check a field format of the responseinformation satisfies a predetermined field format; and the judgingsub-unit is further configured to determine that the radio frequencycard is located when the checking result indicates that the length inbytes of the response information satisfies the predetermined length orto determine that the radio frequency card is located when the checkingresult indicates that the field format of the response informationsatisfies the predetermined field format.
 5. The electronic deviceaccording to claim 3, wherein: the interacting sub-unit is furtherconfigured to send the query instruction at a predetermined timeinterval; the judging sub-unit is further configured to judge whetherthe interacting sub-unit receives the response information continuouslyfor a number of times and whether all the response information receivedcontinuously for the number of times satisfies the predeterminedinformation format, and if so, to determine that the radio frequencycard is located; and the checking sub-unit is further configured tocheck the format of the response information received by the interactingsub-unit continuously for the number of times.
 6. The electronic deviceaccording to claim 1, further comprising a judging unit, wherein: thedata acquiring unit is further configured to acquire pairing data in aconnection request of an electronic device to be paired when theelectronic device receives the connection request; the judging unit isconfigured to judge whether the pairing data is the same as the presetdata; and the connection establishing unit is configured to establish apower line communication connection with the electronic device to bepaired when the judging unit determines that the pairing data is thesame as the preset data or to reject establishment of a power linecommunication connection with the electronic device to be paired whenthe judging unit determines that the pairing data is different from thepreset data.
 7. The electronic device according to claim 1, furthercomprising: an encryption calculating unit configured to performencryption calculation on the preset data through a preset algorithm toobtain encrypted data, wherein the connection establishing unit isfurther configured to establish the power line communication connectionswith the other electronic devices according to the encrypted data. 8.The electronic device according to claim 1, further comprising: a datamodifying unit configured to modify the preset data in response to areceived data modification instruction.
 9. The electronic deviceaccording to claim 1, further comprising: a power line communicationmodule, wherein the power line communication module comprises: alistening unit configured to listen to a data packet, transmitted over apower line, from the other electronic devices when the electronic deviceaccesses the power line; and a broadcast unit configured to broadcast nodata packet and keep silence upon detection of no data packet from theother electronic devices.
 10. The electronic device according to claim9, wherein the broadcast unit is further configured, upon detection ofthe data packet from the other electronic devices, to respond to thedata packet and to join an established power line logical network. 11.The electronic device according to claim 10, wherein the broadcast unitcomprises: a determining unit configured to receive media access controladdresses from the other electronic devices and to determine a centralcoordinator in the power line logical network according to the mediaaccess control address of the electronic device and the media accesscontrol addresses of the other electronic devices; and the broadcastunit is further configured to send a notification to the otherelectronic devices after the electronic device is determined as thecentral coordinator.
 12. A system for pairing electronic devices,comprising at least one electronic device and an encryption apparatus,wherein the encryption apparatus stores preset data, and the electronicdevice comprises: a data acquiring unit configured to detect theencryption apparatus in a preset distance range and to read the presetdata in the detected encryption apparatus; a data storage unitconfigured to store the preset data; and a connection establishing unitconfigured to establish power line communication connections with otherelectronic devices reading and storing the preset data among the atleast one electronic device according to the preset data.
 13. A methodfor pairing electronic devices, comprising: detecting, by an electronicdevice, an encryption apparatus in a preset distance range, readingpreset data in the detected encryption apparatus and storing the presetdata; and establishing, by the electronic device, according to thepreset data, power line communication connections with other electronicdevices reading and storing the preset data.
 14. The method for pairingelectronic devices according to claim 13, wherein detecting, by anelectronic device, an encryption apparatus in a preset distance range,reading preset data in the detected encryption apparatus and storing thepreset data comprises: detecting, by the electronic device, theencryption apparatus in the preset distance range; reading averification code of the encryption apparatus upon detection of theencryption apparatus and judging whether the verification code matcheswith a preset verification code; and reading the preset data from theencryption apparatus if the verification code matches with the presetverification code.
 15. The method for pairing electronic devicesaccording to claim 14, wherein detecting, by the electronic device, theencryption apparatus in the preset distance range comprises: sending aquery instruction for a radio frequency card in the encryptionapparatus; and judging whether response information to the queryinstruction satisfies a predetermined information format upon receptionof the response information, and if so, then determining that the radiofrequency card is located.
 16. The method for pairing electronic devicesaccording to claim 15, wherein the step of judging whether the responseinformation satisfies the predetermined information format comprises:judging whether the length in bytes of the response informationsatisfies a predetermined length; or judging whether a field format ofthe response information satisfies a predetermined field format.
 17. Themethod for pairing electronic devices according to claim 15, whereinsending the query instruction for the radio frequency card in theencryption apparatus comprises: sending the query instruction at apredetermined time interval; wherein before determining that the radiofrequency card is located, the method further comprises: judging whetherthe response information is received continuously for a number of timesand whether all the response information received continuously for thenumber of times satisfies the predetermined information format, and ifso, then determining that the radio frequency card is located.
 18. Themethod for pairing electronic devices according to claim 13, furthercomprising: acquiring, by the electronic device, pairing data in aconnection request of an electronic device to be paired upon receptionof the connection request; judging whether the pairing data is the sameas the preset data; and establishing a power line communicationconnection with the electronic device to be paired if the pairing datais the same as the preset data.
 19. The method for pairing electronicdevices according to claim 13, further comprising: performing, by theelectronic device, encryption calculation on the read preset datathrough a preset algorithm to obtain encrypted data, and establishingthe power line communication connections with the other electronicdevices according to the encrypted data.
 20. The method for pairingelectronic devices according to claim 13, further comprising: listeningto a data packet, transmitted over a power line, from the otherelectronic devices when the electronic device accesses the power line;and broadcasting no data packet and keeping silence upon detection of nodata packet from the other electronic devices.
 21. The method forpairing electronic devices according to claim 20, further comprising: ifthe data packet from the other electronic devices is detected, thenresponding to the data packet and joining an established power linelogical network.
 22. The method for pairing electronic devices accordingto claim 21, wherein a central coordinator in the power line logicalnetwork is determined according to the media access control address ofthe electronic device and the media access control addresses of theother electronic devices; and the electronic device sends a notificationto the other electronic devices after the electronic device isdetermined as the central coordinator.
 23. The method for pairingelectronic devices according to claim 20, wherein at least oneelectronic device accessing the power line among the other electronicdevices broadcasts the data packet if no data packet from any otherelectronic device is detected.